const { Schema, model } = require('mongoose');
const moment = require('moment')

const logsSchema = new Schema({
    //定义好名称后数据库定义名称要一样
    name: String,//登录名字
    address:{
        type: String,//地址
        default:"IP地址",
    },
    operation:String,//操作
    result:String,//执行结果
    time:{
        type:String,
        default:moment().format('YYYY/MM/DD HH:mm')
    }
})

const logsModel = model('logsModel', logsSchema, 'logs')
module.exports.logsModel = logsModel


